#ifndef WX_PRECOMP
#  include "wx/wx.h"
#endif

#ifdef __BORLANDC__
#  pragma hdrstop
#endif

#include "wx/socket.h"
#include "wx/timer.h"

#define TIMER_ID 100

/**
 *	This class incoprorates the following five steps
 *
 *	1.	Initialize wxWidgets socket
 *	2.	Create a socket
 *	3.	Connect to the server
 *	4.	Send data when prompted by user
 *	5.	Constantly get data from the server
 *
 *	@author Timothy Spence <me@timmyspence.com>
 *	@version 1.0
 *	@license http://www.gnu.org/licenses/gpl-3.0.html
 *	@copyright Super Eagle Thrust Productions
 */
class CLIENT : public wxFrame
	{
	public:
		
		// Declares the functions and the constructor to be used by the class
		CLIENT();
		void OnConnectToServer();
		void OnSocketInput();
		void OnTimer(wxTimerEvent& event);
		void OnSocketOutput();
	private:
		
		// Declares the event table to be used for the timer events and creates a new timer
		DECLARE_EVENT_TABLE()
		wxTimer input_timer;
	};

/**
 *	This class contains the virtual function that will initialse the wxApp
 */
class ClientApp : public wxApp
	{
		// Virtual function used to initialise the application and the class and frame
		virtual bool OnInit();
	};

enum
{
    // menu items
    CLIENT_QUIT = 1000,
    CLIENT_OPEN,
	
    // id for socket
    SOCKET_ID
};